import request from '@/utils/request'

// 查询订单配送点列表
export function listPoint(query) {
  return request({
    url: '/system/orderPoint/list',
    method: 'get',
    params: query
  })
}

// 查询订单配送点详细
export function getPoint(ordersPointId) {
  return request({
    url: '/system/orderPoint/' + ordersPointId,
    method: 'get'
  })
}
//通过订单编号 查询订单配送点详情
export function getOrderPointDetil(orderId){
  return request({
    url: '/system/orderPoint/pointDetil/' + orderId,
    method: 'get'
  })
}


// 新增订单配送点
export function addPoint(data) {
  return request({
    url: '/system/orderPoint',
    method: 'post',
    data: data
  })
}

// 修改订单配送点
export function updatePoint(data) {
  return request({
    url: '/system/orderPoint',
    method: 'put',
    data: data
  })
}

// 删除订单配送点
export function delPoint(ordersPointId) {
  return request({
    url: '/system/orderPoint/' + ordersPointId,
    method: 'delete'
  })
}

// 导出订单配送点
export function exportPoint(query) {
  return request({
    url: '/system/orderPoint/export',
    method: 'get',
    params: query
  })
}
